import cv2

o = cv2.imread("10/1.bmp", 0)
Sobe1X = cv2.Sobel(o, cv2.CV_64F, 1, 0)
Sobe1Y = cv2.Sobel(o, cv2.CV_64F, 0, 1)
Sobe1X2 = cv2.convertScaleAbs(Sobe1X)
Sobe1Y2 = cv2.convertScaleAbs(Sobe1Y)
Sobe1 = Sobe1X2 + Sobe1Y2

cv2.imshow("original", o)
cv2.imshow("Sobe1X", Sobe1X2)
cv2.imshow("Sobe1Y", Sobe1Y2)
cv2.imshow("Sobe1", Sobe1)

cv2.waitKey()
cv2.destroyAllWindows()